package com.fuxi.cloud;

import com.fuxi.cloud.common.util.oConvertUtils;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.core.env.Environment;

/**
 * FuXiReportStartClass
 *
 * @Author: 扫地僧
 * @CreateTime: 2021-05-04
 */
@SpringBootApplication(scanBasePackages = {"com.fuxi.cloud"} )
public class FuXiReportStartClass {

    public static void main(String[] args) {
        ConfigurableApplicationContext application = SpringApplication.run(FuXiReportStartClass.class, args);
        Environment env = application.getEnvironment();
        String port = env.getProperty("server.port");
        String path = oConvertUtils.getString(env.getProperty("server.servlet.context-path"));
        System.out.print("\n----------------------------------------------------------\n\t" +
                "Application JimuReport Demo is running! Access URL:\n\t" +
                "Local: \t\thttp://localhost:" + port + path + "/jmreport/list\n\t" +
                "----------------------------------------------------------");
    }

}
